package com.fingard.dsp.bank.reqrespobj.sendsmscode.detail;

import java.util.HashMap;

import com.fingard.xml.XmlTextWriter;

//发送短信验证码响应明细对象
public class RetAtsSmsCodeDetail {

    //响应状态
    public String respCode;
    //响应信息
    public String respInfo;
    //业务流水号
    public String reqSeqID;
    // 手机号码
    public String cellPhone;

    /**
     * 证件类型
     * 0	身份证
     * 1	户口簿
     * 2	护照
     * 3	军官证
     * 4	士兵证
     * 5	港澳居民来往内地通行证
     * 6	台湾同胞来往内地通行证
     * 7	临时身份证
     * 8	外国人居留证
     * 9	警官证
     * 99	其他证件
     */
    public String certType;

    //证件号码
    public String certNum;

    /**
     * 短信验证码 暂用于付款业务
     */
    public String smsCode;

    public void writeToXml(XmlTextWriter retXmlWriter) {
        retXmlWriter.writeStartElement("DetailRecord");
        retXmlWriter.writeElementString("RespCode", respCode);
        retXmlWriter.writeElementString("RespInfo", respInfo);
        retXmlWriter.writeElementString("ReqSeqID", reqSeqID);
        retXmlWriter.writeElementString("CellPhone", cellPhone);
        retXmlWriter.writeElementString("CertType", certType);
        retXmlWriter.writeElementString("CertNum", certNum);
        retXmlWriter.writeElementString("SmsCode", smsCode);
    }

    public HashMap<String, String> writeToHash() {
        HashMap<String, String> retHash = new HashMap<String, String>();
        retHash.put("RespCode", respCode);
        retHash.put("RespInfo", respInfo);
        retHash.put("ReqSeqID", reqSeqID);
        retHash.put("CellPhone", cellPhone);
        retHash.put("CertType", certType);
        retHash.put("CertNum", certNum);
        retHash.put("SmsCode", smsCode);
        return retHash;
    }
}
